package com.dx.photoshake;

import android.app.Activity;
import android.app.ActionBar;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.os.Build;

public class MainActivity extends Activity
{
	Button mbutStart;
	Button mbutStop;
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		mbutStart = (Button) findViewById(R.id.mybut1);
		mbutStop = (Button) findViewById(R.id.mybut2);
		
		mbutStart.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View arg0)
			{
				startService(new Intent("com.dx.photoshake.Myservice"));  
			}
		});
		
		mbutStop.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View arg0)
			{
				 stopService(new Intent("com.dx.photoshake.Myservice"));
			}
		});
	}
}
